code = [".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."]

letter_list = []

for letter in range(97,123):
    letter_list.append(chr(letter))

print(letter_list)
dict_code = dict(zip(letter_list,code))
print(dict_code)

def fun1(words):
    set1 = set()
    for i in words:
        sum = ''
        for j in i:
            sum += dict_code[j]
        print(i,'-->',sum)
        set1.add(sum)
    print(set1)
    print(len(set1))


words = ['gin','zen',"gig", "msg"]
fun1(words)


